

#include <string>
#include <iostream>

#include "bocat/common/base64.hpp"

using namespace bocat::common;


int main()
{
	const char*	plains[] = { "admin:1", "admin:12", "admin:123", "admin:1234", "admin:12345", "admin:123456" };

	for (int i=0; i<6; i++) {
		const char*	p = plains[ i ];

		std::string plain( p );
		std::cout << "PLAIN : " << plain << std::endl;

		std::string enc1 = base64_encode(p, strlen(p));
		std::cout << "ENCODE: " << enc1 << std::endl;

		std::string enc = base64_encode(plain);
		std::cout << "ENCODE: " << enc << std::endl;

		std::string str = base64_decode<std::string>(enc);
		std::cout << "DECODE: " << str << std::endl;
	}

      return 0;
}


